Add delay and fix add_cleanup.