Fixed issue where the service would try to stop the scanner after the

service had been unregistered