fix elem_eval for funcs with ndim > 1