Fix bugs to make sure voted var selection works well.