indx.js patch for query