Fixed CBQuery for empty queries
Fixed location for schemes
Merged from origin