fix extend()