You wont be able to correct old PR until you deactivate your exit.
If you add such own coding and do not clean up the old stuff before then you get such problems, hence you have to make sure that the exit is only taken care about PR created after a date X or you have to clean your data before you activate the exit.