Fix for search and code insert failing on return.