Solve problem when closing the search

It needs to have the same object as the default.
Remove debuging console.log
Fix hasSearch method, it wasn't working with sublevel of a object