Fixes and cleanups for input stability.