removed bug for legend expanding