fix bug in maxLabelLength by initializing to 0 and add nodeHeight parameter