Fix for overflow bug in convert sorted array to bst