Missing assert (thanks Alex).
Fixed a client encoding test.