Fixes #205, IndexError when setInput() is called