fix time bug