fix to clearSourceIdAssignments and spec to test