fix shutdown function for search module