Fixing relationships between models