clean up error_stop() code