fixed offsets after replacement causing bad replacements