Update getRating function to fix rating empty value problem #20