Fix date comparison