Fixed bug in AVL extension