Fix unique and levels semantics