fixed case sensitive legend reference