Fix "Trying to get property of non-object" error when voting for the first time. Ref #225 again...