Fixed bug when calculating "average rating".