I had an issue here when adding a unit with only pre-existing subjects (ie: new subject text box is left empty).  Those relations weren't being added to the units_subject table.  All other situations worked fine.