correct the input for state