Fix line counter