fixed reading ratings when updating database