Bugfix for failed service creation (#339)

Fixes #339.