In practicing Buddhism, you need to cultivate an egoless compassion; when there is self-attachment, compassion is tainted by self-interest and ideas of gain and loss.