when no children are loaded for a closed node it is turned to a leaf node - close #617