Improved task interruption handling + added test
not much