Small change to hide pin properly

when closing the search dialog