Fix incorrect function