fixed emulator crash

Fixed bug that crashed application because the service client wasn't
initialized in time