Fixed problems with retrieving graph from relation.