Fixed small bugs in Query Designer