Correction of a huge bug when recursing through folders