Fix bug in modified update script