fix time check