cleanup, fixing possible async problem