fixes find method when no file is loaded