fix the time bug