fix small bugs with cypher and undefined tty.setRawMode