Fixed m2m and one2one serialization