Correct bug Length getter function