Fixed the looping of the RP filter so that it does the right thing.