Some script corrections