Fix `undefined variable: x`  issue as mentioned in #2.