minor: connect the layout first and then change its properties, not vice versa.