Fix the voting queries following the schema change

I renamed the `UserProfile` table to `UserProfiles`, but forgot about these queries.