Patch for botched update

This fixes the completely borked autoupdate function, resulting in
corrupted installations, malfunctions, and a shot autoupdate function.