fix typo in function