Fix state.get function

state.get was not returning the value