diff --git a/createrepo_c.spec b/createrepo_c.spec
index 384b0b0..d03a98b 100644
--- a/createrepo_c.spec
+++ b/createrepo_c.spec
@@ -10,13 +10,13 @@
 %bcond_without drpm
 %endif
 
-%if 0%{?rhel} || 0%{?fedora} < 29
+%if 0%{?rhel}
 %bcond_with zchunk
 %else
 %bcond_without zchunk
 %endif
 
-%if 0%{?rhel} || 0%{?fedora} < 29
+%if 0%{?rhel} && 0%{?rhel} < 8
 %bcond_with libmodulemd
 %else
 %bcond_without libmodulemd
@@ -25,7 +25,7 @@
 Summary:        Creates a common metadata repository
 Name:           createrepo_c
 Version:        0.17.2
-Release:        2%{?dist}
+Release:        3%{?dist}
 License:        GPLv2+
 URL:            https://github.com/rpm-software-management/createrepo_c
 Source0:        %{url}/archive/%{version}/%{name}-%{version}.tar.gz
@@ -175,6 +175,9 @@ ln -sr %{buildroot}%{_bindir}/modifyrepo_c %{buildroot}%{_bindir}/modifyrepo
 %{python3_sitearch}/%{name}-%{version}-py%{python3_version}.egg-info
 
 %changelog
+* Tue Jul 27 2021 Pavla Kratochvilova <pkratoch@redhat.com> - 0.17.2-3
+- Fix spec conditional to enable libmodulemd in RHEL >= 8 (RhBug:1816753) 
+
 * Wed Jun 16 2021 Mohan Boddu <mboddu@redhat.com> - 0.17.2-2
 - Rebuilt for RHEL 9 BETA for openssl 3.0
   Related: rhbz#1971065