Fixed loop bug when printing leaves