fix function typo