Fix TypeError: extension.stateObj.enable is not a function, fixe #25