Fixed inverted logic for rdf:resource