cleanup inapropriate access to db