Simplified code. Removed not needed if-else

Change-Id: I9660f543deefb5154a03535b668ee68eb3394e75