fixed bug in service encapsulation from strings