fixing shutdown on windows service