fix(input): corrected NPE when input goes away

Closes #392