Bug fix for avl.cpp