#10 fixing a bug in registering service factory