use flint_cleanup in a few more places