fixed context handling of MongoDataSource and ResourceHandler