Added on_exit().