Clockfix patch rebased on r9299.