added incquery patch for Xcore compatibility