Fix `this` scope issue