Use correct rank filter replacement function