diff --git a/sources/awesome-widget/plugin/awkeys.cpp b/sources/awesome-widget/plugin/awkeys.cpp
index 1744fb7..f483209 100644
--- a/sources/awesome-widget/plugin/awkeys.cpp
+++ b/sources/awesome-widget/plugin/awkeys.cpp
@@ -234,8 +234,10 @@ void AWKeys::reinitKeys(const QStringList currentKeys)
 void AWKeys::updateTextData()
 {
     // do not do it in parallel to avoid race condition
+    m_mutex.lock();
     calculateValues();
     QString text = parsePattern(keyOperator->pattern());
+    m_mutex.unlock();
 
     emit(needTextToBeUpdated(text));
     emit(dataAggregator->updateData(values));
