Bug fix to update.sh