fix for service handling code