patch ServiceLocator

for better type resolution