fixed a typo calling the wrong extend function