Bug: wrong use of extend.