Lines filtering improved