Bugfixes for search and deployment