fixes and changes to legend