Backport updates from Zedom8or.