Fixed remove dirs issue