Fixes to update.sh