some clock related fixes