db usage fix