Renamed NotValidQueryException to InvalidQueryException.