Fix query bug around bracket.