repair bug in function bindQuery