script changes for ernie and indexes and bug42643