Rename function and fix typo