Fix extra line rendering bugs