small fix to SQL of getBonusPoints