[fix] Bugs in adapters and client