Fix crash on start/stop service for some devices