Bug fix: db api

db client must be instance