Fixing bad logic bug when writing RDF Data.