fix rating calc