Fixed extra iteration step

@vigsterkr @lisitsyn Regarding issue #1991 
skip_line caused the problem. For now it works.