correct variable error in db_read