Broken checkout script mended