fix statevariable