fixed bug in DefaultQuery