fix typo on extend function