fixes to update.sh