added check for poll end time > poll start time