Fixed script for old and new setup scripts.

Change-Id: I62e7f5ea451b5860e00ca22feaa61f8f193bc11c