Fixed TreeParser class