fixed bugs with line numbers and other issues.