fix bug with time