bug in rewardGiven