fix dispose bug