fix folder deletion bug