improve function set_active_system

Change-Id: I1623abc4e54a04f7c82876cf0ae8fb538b0b2e6a