Fixed stopping as a windows service issue