Handle tilde in input