fixed some typos
added check for branch verification invalid leaf