added failsafe for single range query pair