fix wrong Dispose method signature in generator