Fixed search to respect passed object

..didn't quite understand how it worked before but now all good :)