Fix incorrect behavior of the parameter MAX_INNERLINK_HISTORY
next step