Auto-update fixes

Several fixes related to auto-updates.

See the individual commit messages for specifics.