Fix broken tests, update client to make sure that it unregisters on 'stop's