remove metadata on activate
fixed layout border for legend