Fix bug

I was incorrectly calling the leaves method and
not getting the leaves attribute.