fixed javascript weird date issue