fixed bug of extend