fix bug in handling <ENTER> and other invalid responses