fix bug for querymodel