Few more logic changes

Change-Id: I2edc0341fd7007db9f4281a53dca12ad00595034