Fixed code to add rewards and tasks