Fix time bug