fix for date validation