Fixed bug in getLength implementation for MyList