Fixed the queries using the wrong variable to get rating row information.