remove extra directories