Fix date format bug