Fixed a bug with folder recursion