Fix date check