fixed weird date bug