permissions, plus other fixes