Fixing service crash

Possible fix to service crash.
>>>>>NOT TESTED<<<<<