Revert "remove data from M:N table which points to non existent data"

This reverts commit 82caaf4bc44987b9fa02d7f40e65ad6e15228191.