Fixed database access