correct terminal exit