Minor fixes to BST check