Update gems
Optimize search conditions