Fix incorrect variable references in RDF