Fix type returned from rfind