added checks for dissallowed clauses in main queries