fixed error with folder removal