fix build_rdf for rankable relations