Fix up logic

This commit simplifies and removes extra logic.

Change-Id: I61879c41e60ef2dc861b7c4be1c75f3c2e608d13