Shutdown throws lots of exceptions, fixes #1813