Correction of memory management errors
The calculation of `max_lines` takes in account the additionnal lines from URLs