off by 1 error going from custom to compare previous fixed