Fix crucial bug in getGuildsScores function