Fix bug where subscribers were being removed twice in a loop.