Dispose now also sets the right class loader.