Fixed legend issues