Index: kernel/include/IMP/Vector3D.h
===================================================================
--- kernel/include/IMP/Vector3D.h	(revision 390)
+++ kernel/include/IMP/Vector3D.h	(working copy)
@@ -8,10 +8,11 @@
 #ifndef __IMP_VECTOR_3D_H
 #define __IMP_VECTOR_3D_H
 
-#include <cmath>
 #include "IMP_config.h"
 #include "base_types.h"
 
+#include <cmath>
+
 namespace IMP
 {
 
@@ -32,7 +33,8 @@
   Vector3D() {}
 
   //! \return A single component of this vector (0-2).
-  Float get_component(int i) const {
+  Float get_component(unsigned int i) const {
+    IMP_assert(i < 3, "Invalid component of vector requested");
     return vec_[i];
   }