Index: pcbdoc.c =================================================================== --- pcbdoc.c (revision 35533) +++ pcbdoc.c (revision 35534) @@ -913,11 +913,11 @@ } if (copper_valid[1]) { - pcb_pstk_shape_copy(&shape[n], &copper_shape[0]); shape[n].layer_mask = PCB_LYT_INTERN | PCB_LYT_COPPER; n++; + pcb_pstk_shape_copy(&shape[n], &copper_shape[1]); shape[n].layer_mask = PCB_LYT_INTERN | PCB_LYT_COPPER; n++; } if (copper_valid[2]) { - pcb_pstk_shape_copy(&shape[n], &copper_shape[0]); shape[n].layer_mask = PCB_LYT_BOTTOM | PCB_LYT_COPPER; n++; + pcb_pstk_shape_copy(&shape[n], &copper_shape[2]); shape[n].layer_mask = PCB_LYT_BOTTOM | PCB_LYT_COPPER; n++; } if (mask_valid[0]) { @@ -924,8 +924,8 @@ pcb_pstk_shape_copy(&shape[n], &mask_shape[0]); shape[n].layer_mask = PCB_LYT_TOP | PCB_LYT_MASK; shape[n].comb = PCB_LYC_AUTO | PCB_LYC_SUB; n++; } - if (mask_valid[1]) { - pcb_pstk_shape_copy(&shape[n], &mask_shape[0]); shape[n].layer_mask = PCB_LYT_BOTTOM | PCB_LYT_MASK; shape[n].comb = PCB_LYC_AUTO | PCB_LYC_SUB; n++; + if (mask_valid[2]) { + pcb_pstk_shape_copy(&shape[n], &mask_shape[2]); shape[n].layer_mask = PCB_LYT_BOTTOM | PCB_LYT_MASK; shape[n].comb = PCB_LYC_AUTO | PCB_LYC_SUB; n++; } shape[n].layer_mask = 0;