query label works properly