fix invalid token handling
fix nil ratings