now clearing locals object when script changes

Change-Id: I0cc17aeb53829c7fca5f133507b88ecc6687274c