Fix the anonymous user queries

Anonymous votes now have a null user id instead of 0
Fix a crash
Merge pull request #291 from adrianbanks/fix-anonymous-voting-queries

Fix the anonymous user queries