Fixed validation of start and end dates