Additional edits to correct errors in script.