hunting bug in getLength()