fix _extend bug