bug fixes for find method