Fix bug in user relation factory.