Fix layout sizes for other dimensions

@peter-budo