fix varargin index