Fix folder generating issue