minor improvements to legend