Fix fetching key by text bug in db4 backend