fix incorrect arity check issue