Fix date bug