Make QI compatible with both 3.0.x and 3.1.x