fix time js bug