Fix windows service termination