Fix reading input; prevent dropped commands