Merge upstream
Fixed locking
Fixed service