Fix to start/stop the service.

Fixes #385