Fixed invalid $root keyword check.