fix loop upper bound in show_manpage