Bugfix - incorrect line skipping calculation