improve clock change handling based on feedback from mizzao