fixed a bug in ratings