Fix bug with folder creation