fixes for cql queries