diff --git a/NIF_IO.h b/NIF_IO.h
index 90827d871a54c6740bd221d7d77aa4aaa1872d47..906319d743520d3032b972f998ddefdcabf9c2ed 100644
--- a/NIF_IO.h
+++ b/NIF_IO.h
@@ -89,7 +89,9 @@ typedef uint writeResult;
 //typedef uint	nifIndex;
 typedef ushort	nifFlags;
 
+#ifndef NULL
 #define NULL 0
+#endif
 
 /* Valid values for some texturingproperty attributes. */
 typedef enum {
@@ -276,4 +278,4 @@ private:
 
 
 
-#endif // TAH_NIF_LIB_NIF_IO_H
\ No newline at end of file
+#endif // TAH_NIF_LIB_NIF_IO_H
diff --git a/nif_math.h b/nif_math.h
index 77fc3afe37d5338e24a9b40d5a645c74591cd21f..67d53ef65ea756f5b23a89806da3d6cd1018ee1a 100644
--- a/nif_math.h
+++ b/nif_math.h
@@ -58,4 +58,4 @@ void SetIdentity44( Matrix44 & m );
 void PrintMatrix33( Matrix33 & m, ostream & out );
 Quaternion MatrixToQuat( Matrix33 & m );
 
-#endif
\ No newline at end of file
+#endif
diff --git a/pyniflib.i b/pyniflib.i
index c6106b523dc0500f18247c81acaa9fd65f77b794..12bad33093e99b76049f13e19caaff7076b7293b 100644
--- a/pyniflib.i
+++ b/pyniflib.i
@@ -43,14 +43,14 @@ POSSIBILITY OF SUCH DAMAGE. */
     try {
       $action
     }
-    SWIG_CATCH_STDEXCEPT // catch std::exception 
+    //SWIG_CATCH_STDEXCEPT // catch std::exception 
     catch (...) {
-     SWIG_exception(SWIG_UnknownError, "Unknown exception");
+      SWIG_exception(SWIG_UnknownError, "Unknown exception");
     }
 }
 
 %{
-	#include "NIFlib/niflib.h"
+#include "niflib.h"
 %}
 
 template <class T> 
@@ -62,7 +62,7 @@ struct Key {
 
 %template(vector_float) std::vector<float>;
 %template(vector_blk_ref) std::vector<blk_ref>;
-%template(vector_Vector3D) std::vector<Vector3D>;
+%template(vector_Vector3) std::vector<Vector3>;
 %template(vector_Color) std::vector<Color>;
 %template(vector_UVCoord) std::vector<UVCoord>;
 %template(vector_Triangle) std::vector<Triangle>;
@@ -71,13 +71,13 @@ struct Key {
 %template(map_int_float) std::map<int, float>;
 %template(Key_Quaternion) Key<Quaternion>;
 %template(vector_Key_Quaternion) std::vector< Key<Quaternion> >;
-%template(Key_Vector3D) Key<Vector3D>;
-%template(vector_Key_Vector3D) std::vector< Key<Vector3D> >;
+%template(Key_Vector3) Key<Vector3>;
+%template(vector_Key_Vector3) std::vector< Key<Vector3> >;
 %template(Key_float) Key<float>;
 %template(vector_Key_float) std::vector< Key<float> >;
 %template(Key_string) Key<std::string>;
 %template(vector_Key_string) std::vector< Key<std::string> >;
 
-%include "../NIFlib/niflib.h"
+%include "niflib.h"