Fix calculateBonuses