Fixing bug with clock