Fix bug when client tries to register an undefined service