fix state_ask_name to look for both carriage return and line feed