fix bug in time