update script with last fixes