Upgrading and correcting scripts