Fix date equals bug