Fix logic error in vote detection.