fixing error in labelRects() function for list references