Changes to make LockTabs2Switch intelligent

Changes to make LockTabs2Switch intelligent