Fixed: deadlock in TestClient that occurs often on FreeBSD.
Changed: removed few build warnings.