diff --git a/alib2std/src/extensions/algorithm.hpp b/alib2std/src/extensions/algorithm.hpp
index 57c3c11d756487473aa1c26a0a8614178f0c1688..88fa6932d966c0b09747f74889852f8688f0a982 100644
--- a/alib2std/src/extensions/algorithm.hpp
+++ b/alib2std/src/extensions/algorithm.hpp
@@ -20,7 +20,7 @@
 
 #include <algorithm>
 #include <functional>
-#include <exception>
+#include <stdexcept>
 
 namespace ext {
 
diff --git a/aql2/src/prompt/ReadlinePromptHistory.cpp b/aql2/src/prompt/ReadlinePromptHistory.cpp
index 1ce2f0a87a3c8b8f68e242fcea7f1864e73b873f..afd7d76a1bc5ce28e32e37be5b0240306f33e66c 100644
--- a/aql2/src/prompt/ReadlinePromptHistory.cpp
+++ b/aql2/src/prompt/ReadlinePromptHistory.cpp
@@ -4,6 +4,7 @@
 
 #include <cstring>
 #include <array>
+#include <algorithm>
 
 static constexpr std::array < std::pair < char, char >, 8 > esc_char_list = { { { '\a', 'a'}, {'\b', 'b'}, {'\f', 'f'}, {'\n', 'n'}, {'\r', 'r'}, {'\t', 't'}, {'\v', 'v'}, {'\\', '\\'} } };
 
diff --git a/tests/cppaql/glushkovRteTest.cpp b/tests/cppaql/glushkovRteTest.cpp
index ce0ea3f30df1caf2c9f4fdef30475e34025fe2db..cb0d58f5e3d9a9ca5cf0755333b6a3f7b48d10ab 100644
--- a/tests/cppaql/glushkovRteTest.cpp
+++ b/tests/cppaql/glushkovRteTest.cpp
@@ -4,6 +4,7 @@
 #include <libgen.h>
 #include <map>
 #include <ext/sstream>
+#include <cstring>
 
 #include "testing/TimeoutAqlTest.hpp"
 #include "testing/TestFiles.hpp"