Minor fixes for legend printing