Fixes bug where input field is not correctly enabled/disabled