handle queryModeSize
fix switch_mode