fixed issue #98 in which the clear leaf types wasn't working properly in the querying