Fix duplicate folder creation