Fix treating wave.getState as an object instead of a function