Fixed legend issue