Improved end column/end line calculations in finalize.