preserve $lastexit code