fixed a dumb bug in xLength