fixes #4207 input bug.
Merge pull request #66 from chengstory/Bug#4207

fixes #4207 input bug.