Fixed legend misplacement