Fixed #603
Merge pull request #605 from MArcJ/relation-bug

Fixed #603