diff --git a/tmva/inc/MethodBase.h b/tmva/inc/MethodBase.h
index abab82cc9e1118a9079c1294c5f35d5401e0cfc7..49e47a65ff14d7a333f56ee1e15524e4c5b48cff 100644
--- a/tmva/inc/MethodBase.h
+++ b/tmva/inc/MethodBase.h
@@ -211,7 +211,7 @@ namespace TMVA {
    public: // these two need to be public, they are used to read in-memory weight-files
       void ReadStateFromStream  ( std::istream& tf );         // backward compatibility
       void ReadStateFromStream  ( TFile&        rf );         // backward compatibility
-#if ROOT_SVN_REVISION >= 32259 && (ROOT_VERSION_CODE >= ROOT_VERSION(5,26,0))
+#if (ROOT_SVN_REVISION >= 32259) && (ROOT_VERSION_CODE >= ROOT_VERSION(5,26,0))
       void ReadStateFromXMLString( const char* xmlstr );      // for reading from memory
 #endif
 
diff --git a/tmva/inc/Reader.h b/tmva/inc/Reader.h
index fbf06192a985961ed66038e9dc9bcc947126f33b..f956d4520e0bbb3da35a490e7481bafb10f6b299 100644
--- a/tmva/inc/Reader.h
+++ b/tmva/inc/Reader.h
@@ -86,7 +86,8 @@ namespace TMVA {
   
       // book MVA method via weight file
       IMethod* BookMVA( const TString& methodTag, const TString& weightfile );
-#if ROOT_SVN_REVISION >= 32259
+#if (ROOT_SVN_REVISION >= 32259) && (ROOT_VERSION_CODE >= ROOT_VERSION(5,26,0))
+
       IMethod* BookMVA( TMVA::Types::EMVA methodType, const char* xmlstr );
 #endif
       IMethod* FindMVA( const TString& methodTag );
diff --git a/tmva/src/Reader.cxx b/tmva/src/Reader.cxx
index 6fe71cf4c4c3a5eddbeeb431e949f073ff1056c8..102dd34cc7188adcb4f09e70ef4a687292f702af 100644
--- a/tmva/src/Reader.cxx
+++ b/tmva/src/Reader.cxx
@@ -398,7 +398,7 @@ TMVA::IMethod* TMVA::Reader::BookMVA( TMVA::Types::EMVA methodType, const TStrin
    return method;
 }
 
-#if ROOT_SVN_REVISION >= 32259 && (ROOT_VERSION_CODE >= ROOT_VERSION(5,26,0))
+#if (ROOT_SVN_REVISION >= 32259) && (ROOT_VERSION_CODE >= ROOT_VERSION(5,26,0))
 //_______________________________________________________________________
 TMVA::IMethod* TMVA::Reader::BookMVA( TMVA::Types::EMVA methodType, const char* xmlstr )
 {