fix wrong function name on error message