fixed issue where legend color squares were missing/misgrouped