Added support for separating the inactive lines completely in the sorting