Add missing code
Optimize search reset