Fix errors in clock