Fix bug in canceling clocks