Update from Tibor's main branch.