fixed undefined variable error when passing quoteTagIndex[]