Fixes model being added to collection even after commit failure.