Fixed input element state being incorrectly initialized