Pull Gearoid's fixes