Fix bug with relation