Fixed restoring tree state