fixed newquery