Removed the nested if.