Moved retrieval of rating to different clause