fixed bug with m2m save on apps