fixed bquery.c