fix parsing date bug