This reverts commit 68403267117bf5cf73e0f747887f2834336ae4a2. The commit bungled deinitialization in main.