Fixed writing of input values.