Fix incorrect function name in an exception