Another fix for service crashes.