Fixes query name of relations. refs #77