Fix arity of error_fun