Fix sluggish application exit with latest CI build