Fixed a bug that messed up the result after merging lines