fixed bug when removing a service definition; not storing metadata (true if service_definition is present, false otherwise) and type anymore (always 'realtime')