Fixed errors in update script.