fixed bug in is valid binary search tree