ballot: error check