fix bugs in making change points