on_exit: remove side effects from asserts

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>