I had the same problem .. try putting this line just before your gets statement

$rc = sendkeys("{BACKSPACE}")