Index: src/Common/PassVisitor.proto.h
===================================================================
--- src/Common/PassVisitor.proto.h	(revision 5fec3f6589753dd1111fa51da42185c12bd181c3)
+++ src/Common/PassVisitor.proto.h	(revision 4990812a267816ea3e0fb7cc082e6257d1db7446)
@@ -47,5 +47,5 @@
 
 	operator bool() { return m_ref ? *m_ref : true; }
-	bool operator=( bool val ) { return *m_ref = val; }
+	bool operator=( bool val ) { assert(m_ref); return *m_ref = val; }
 
 private:
@@ -53,7 +53,7 @@
 	friend class ChildrenGuard;
 
-	bool * set( bool & val ) {
+	bool * set( bool * val ) {
 		bool * prev = m_ref;
-		m_ref = &val;
+		m_ref = val;
 		return prev;
 	}
@@ -67,5 +67,5 @@
 	ChildrenGuard( bool_ref * ref )
 		: m_val ( true )
-		, m_prev( ref ? ref->set( m_val ) : nullptr )
+		, m_prev( ref ? ref->set( &m_val ) : nullptr )
 		, m_ref ( ref )
 	{}
@@ -73,5 +73,5 @@
 	~ChildrenGuard() {
 		if( m_ref ) {
-			m_ref->set( *m_prev );
+			m_ref->set( m_prev );
 		}
 	}
Index: src/main.cc
===================================================================
--- src/main.cc	(revision 5fec3f6589753dd1111fa51da42185c12bd181c3)
+++ src/main.cc	(revision 4990812a267816ea3e0fb7cc082e6257d1db7446)
@@ -371,5 +371,18 @@
 		} // if
 		return 1;
-	} // try
+	} catch(...) {
+		std::exception_ptr eptr = std::current_exception();
+		try {
+			if (eptr) {
+				std::rethrow_exception(eptr);
+			}
+			else {
+				std::cerr << "Exception Uncaught and Unkown" << std::endl;
+			}
+		} catch(const std::exception& e) {
+			std::cerr << "Unaught Exception \"" << e.what() << "\"\n";
+		}
+		return 1;
+	}// try
 
 	deleteAll( translationUnit );
