handle empty $root