Fix bug with has many as polymorphs