Fixed issues for search and refresh