fix storing of service state

Does not work because we do not have the service name yet