merge patches from daniel to fix merge artifact and test failure