Fix services registering. fixes #1