Fix invalid input in prompt because of the utf8 terminal check