fix time bugs