More line bug fixes