fixes to make this version work