fix bug in db_helper for db selection