Changed relation to use @klass.with_connection instead of with_connection alone