Fixed `extend()` method