Fixed error with folder generation