Detecting, Repairing, and Preventing Human-Machine Miscommunication