fix directory not remove bug