Fix the relatedTo Query operator

Before it didn't work, now it does.