fix if to else if