Call to a member function find() on a non-object fix