fixed getEditableRelation, after comments by Martijn.