Fix for location search
Implement lock and unlock