fix rfind