ii: fix wrong max segment

Redmine: fixes #2438

Reported by yoku0825. Thanks!!!