fixed bugs in sendGift