wip-testing-1.2.2

Same changes as in wip-testing merge to master (e0b9b21a31dd8387b8c240110f6c376729cc08fc), on the 1.2.2 branch, for convenience