Fixes incorrect relations