db access fixes