fixed a bug in update.sh