adds default value to search and resolves second-click-error