Simplified a few duplicated branches.

Change-Id: Iace45f46c53546c021dfaf2b66fcf960ed604eb0