string query fixes