Clock fixed

and tested