Fix bugs in selection of client.

Add missing addCategory method to ClientImpl