diff --git a/src/Autopilot/flipflop.cxx b/src/Autopilot/flipflop.cxx
index aba5883c5..c82981849 100644
--- a/src/Autopilot/flipflop.cxx
+++ b/src/Autopilot/flipflop.cxx
@@ -24,7 +24,7 @@
 #include "inputvalue.hxx"
 #include <Main/fg_props.hxx>
 
-using namespace FGXMLAutopilot;
+namespace FGXMLAutopilot {
 
 /**
  * @brief Flip flop implementation for a RS flip flop with dominant RESET
@@ -279,6 +279,10 @@ public:
   virtual bool getState( double dt, DigitalComponent::InputMap input, bool & q );
 };
 
+} // namespace
+
+using namespace FGXMLAutopilot;
+
 bool MonoFlopImplementation::configure( const std::string & nodeName, SGPropertyNode_ptr configNode )
 {
   if( JKFlipFlopImplementation::configure( nodeName, configNode ) )