bug fix and new clock design