patch for compiling index