fixes #6 correctly handling case when a text not in the list is typed