Removed one extra if - else block.