fix typo in functions