Fixed some minor bugs with the gamification sql database