fix up halt and add doc