fix relation in m2m table