Some experiments with barriers, and other fixes