Fix a (potentially crashing) bug for the automatic sizing of the lottery boxes