More tweaks to fixing script