Adjusted Jena queries for the logic