hopefully fixes a Bug with CancellationToken.Register ... Code is now ugly though