fix extend bug