fixed handling of strings while input checking