Implement independent terminate_instaces

Change-Id: I501daf8bf06018e95e22b2fd2e53d9d794597041