run all finalizers on exit. fixes #3624