Fixed bug with not saving many-to-many relationships