Bugfix: correctly handle char ranges in input dialog