More fixes for potential race conditions during service start/stop