Fix #8

I'm pretty sure `leave` here should have been `leaf`? None of the test cases seem to catch this.