fix if/else/if/else to if/elseif/else