A bunch of small fixes to make registration client work with server modifications.