Some preliminary fixes by Antokolos