Bug fixes for example queries