Added tests to the client which fixed some issues.