fix bug in wizard where invalid input may cause an exception. fixes #121

by making the typo detection algorithm more robust against wrong input.