Fix typo and use correct function