fixed off-by-one-error in Purifier