Buttons widths moved out of unnecssry if loop