fixed sorting issues with rating