fix many-to-many relations