fix Dispose bug