fix simple BST implementation