Small small improvement of the code of getRelation