fix stupid javascript date bug