COAP-4. Fix and associated unit tests.