Fixing problem with legend.