diff --git a/src/union.cpp b/src/union.cpp
index 523cf7a2efbc2a7fbd154972b7c31637280bba26..2ab8724a0e377a171c37403194c18baf49d60307 100644
--- a/src/union.cpp
+++ b/src/union.cpp
@@ -7,9 +7,15 @@
 #include <intersections.h>
 #include <split_triangle.h>
 #include <convex_triangulation.h>
+#include <orientation.h>
 
 std::vector<Triangle> unionizeTopAndBottom(const Triangle &top, const Triangle &bot)
 {
+    // degenerate line / point case
+    if (orientation(top) == Collinear) {
+        return {bot, top};
+    }
+
     std::vector<Triangle> result;
 
     TriangleEdges topEdges = TriangleEdges(top);
diff --git a/src/utilities/contourize.cpp b/src/utilities/contourize.cpp
index 9d5cfc3b27085924849f3b54e5adb49f36592096..01a496d6b38868dbe4817d4f59853ee275206f0c 100644
--- a/src/utilities/contourize.cpp
+++ b/src/utilities/contourize.cpp
@@ -41,7 +41,7 @@ std::vector<Point> contourize(const std::vector<Point> &points) {
     // infinite loop detection
     int seen = 0;
 
-    while (!candidates.empty()) {
+    while (candidates.size() > 1) {
         // detect infinite loop
         if (seen >= candidates.size()) {
             throw ContourizeException();
@@ -59,5 +59,7 @@ std::vector<Point> contourize(const std::vector<Point> &points) {
             seen++;
         }
     }
+
+    result.push_back(candidates.front());
     return result;
 }
diff --git a/tests/edge_union_cases.cpp b/tests/edge_union_cases.cpp
index c118d48c7608dc3fb8cafd51a9c75cf03f0e3498..233f2a3dd0f3344733b2f51e5d01c7cf670ba2df 100644
--- a/tests/edge_union_cases.cpp
+++ b/tests/edge_union_cases.cpp
@@ -39,7 +39,9 @@ INSTANTIATE_TEST_SUITE_P(EdgeUnionTests, InstantiateUnionEdgeTests, testing::Val
 																		// Point on edge of triangle
 																		UnionParams{Triangle({0, 0, 6}, {5, 0, 6}, {2, 3, 6}, 1), Triangle({0, 2, 3}, {0, 2, 3}, {0, 2, 3}, 2), {Triangle({0, 0, 6}, {5, 0, 6}, {2, 3, 6}, 1), Triangle({0, 2, 3}, {0, 2, 3}, {0, 2, 3}, 2)}},
 																		// Point on vertex of triangle
-																		UnionParams{Triangle({0, 0, 2}, {5,0,2}, {2,3,2}, 1), Triangle({0,0,0}, {0,0,0}, {0,0,0}, 2), {Triangle({0, 0, 2}, {5,0,2}, {2,3,2}, 1), Triangle({0,0,0}, {0,0,0}, {0,0,0}, 2)}}
+																		UnionParams{Triangle({0, 0, 2}, {5,0,2}, {2,3,2}, 1), Triangle({0,0,0}, {0,0,0}, {0,0,0}, 2), {Triangle({0, 0, 2}, {5,0,2}, {2,3,2}, 1), Triangle({0,0,0}, {0,0,0}, {0,0,0}, 2)}},
+																		// Line and Triangle
+																		UnionParams{Triangle({0,0,5}, {5,0,5}, {2,3,5}, 1), Triangle({0,0,0}, {1,1,0}, {6,6,0}, 2), {Triangle({0,0,5}, {5,0,5}, {2,3,5}, 1), Triangle({0,0,0}, {1,1,0}, {6,6,0}, 2)}}
 																		));
 
 TEST(UnionEdgeTests, TriangleVertexOnEdge)
diff --git a/tests/union_tests.cpp b/tests/union_tests.cpp
index 900335aa49fbf6a27940db7d9f12c05c5c88ae77..fa4f09fa7088a7b6ca0163caade87e791517d507 100644
--- a/tests/union_tests.cpp
+++ b/tests/union_tests.cpp
@@ -63,9 +63,11 @@ TEST(UnionTests, FoldTriangleTest)
     auto results = unionize(bottom, top);
 
     std::vector<Triangle> expected_results_1 = {
-        Triangle({0.1, 9,1}, {1.91038, 4.23585,1}, {5,5}, 2),
-        Triangle({1.91038,4.23585,1}, {2.27273,4.09091,1}, {5, 5}, 2),
-        Triangle({0,5}, {3,2}, {5,3}, 1)
+        Triangle({0, 5,3}, {2.6129, 2.3871,3}, {1.91038,4.23585,3}, 1),
+        Triangle({3, 2,3}, {5, 3,3}, {2.27273,4.09091,3}, 1),
+        Triangle({3,2,3}, {2.27273,4.09091,3}, {2.6129,2.3871,3}, 1),
+        Triangle({2.6129,2.3871,3}, {2.27273,4.09091,3}, {2,4,3}, 1),
+        Triangle({0.1,9,1}, {2,4,1}, {5,5,1}, 2)
     };
 
     EXPECT_EQ(results, expected_results_1);
@@ -75,10 +77,10 @@ TEST(UnionTests, FoldTriangleTest)
     results = unionize(bottom, top);
 
     std::vector<Triangle> expected_results_2 = {
-        Triangle({0,5}, {2.6129, 2.3871}, {1.91038, 4.23585}, 1),
-        Triangle({3,2}, {5, 3}, {2.6129, 2.3871}, 1),
-        Triangle({5,3}, {2.27273, 4.09091}, {2.6129, 2.3871}, 1),
-        Triangle({2.27273,4.09091}, {2, 4}, {2.6129, 2.3871}, 1),
+        Triangle({0,5, 3}, {2.6129, 2.3871, 3}, {1.91038, 4.23585, 3}, 1),
+        Triangle({3,2, 3}, {5, 3, 3}, {2.6129, 2.3871, 3}, 1),
+        Triangle({5,3, 3}, {2.27273, 4.09091, 3}, {2.6129, 2.3871, 3}, 1),
+        Triangle({2.27273,4.09091, 3}, {2, 4, 3}, {2.6129, 2.3871, 3}, 1),
         Triangle({0.1,9}, {2, 4}, {5, 5}, 2)
     };
 
diff --git a/tests/unit_tests/contourize_tests.cpp b/tests/unit_tests/contourize_tests.cpp
index 80f0f6a3451a4d1fbf8f93f2c931dd3ebedb0930..aadd4cada3d80358730203c43a9e74b5212d73c3 100644
--- a/tests/unit_tests/contourize_tests.cpp
+++ b/tests/unit_tests/contourize_tests.cpp
@@ -12,6 +12,11 @@ TEST(ContourizeTest, Simple) {
 	EXPECT_EQ(result, expected);
 }
 
+TEST (ContourizeTest, Collinear) {
+	std::vector<Point> points {{2,3,5}, {0,0,5}, {2.5,2.5,5}, {-0,0,5}};
+	auto result = contourize(points);
+	
+}
 
 TEST(ContourizeTest, Triangle) {
 	std::vector<Point> points{{3,1}, {4,1}, {3.33333, 1.6666}};