Fixed database connection interceptor