fix bugs of deletion