fixes labeling legend error identified by steven liao and a variable
label error