add missing closing brace to queries