Fixed issue caused when service locator was not injected