fixed bug with js time