diff --git a/split-files.py b/split-files.py
index a660db8..9b6e9f7 100644
--- a/split-files.py
+++ b/split-files.py
@@ -58,9 +58,9 @@ for file in files(buildroot):
         o = o_rpm_macros
     elif '/usr/lib/systemd/tests' in n:
         o = o_tests
-    elif re.match(r'/libsystemd-shared-*.so$', n):
+    elif re.search(r'/libsystemd-shared-.*\.so$', n):
         o = o_main
-    elif re.match(r'/libcryptsetup-token-systemd-.*\.so$', n):
+    elif re.search(r'/libcryptsetup-token-systemd-.*\.so$', n):
         o = o_udev
     elif re.search(r'/lib.*\.pc|/man3/|/usr/include|\.so$', n):
         o = o_devel
diff --git a/systemd.spec b/systemd.spec
index d5ca3bc..724d16e 100644
--- a/systemd.spec
+++ b/systemd.spec
@@ -31,7 +31,7 @@ Name:           systemd
 Url:            https://www.freedesktop.org/wiki/Software/systemd
 %if %{without inplace}
 Version:        250.4
-Release:        1%{?dist}
+Release:        2%{?dist}
 %else
 # determine the build information from local checkout
 Version:        %(tools/meson-vcs-tag.sh . error | sed -r 's/-([0-9])/.^\1/; s/-g/_g/')
@@ -1004,6 +1004,9 @@ fi
 %files standalone-sysusers -f .file-list-standalone-sysusers
 
 %changelog
+* Fri Mar 18 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 250.4-2
+- Fix the wrong file assignment done in previous version
+
 * Thu Mar 17 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 250.4-1
 - Move libcryptsetup plugins to -udev (#2031873)
 - Move systemd-cryptenroll to -udev (David Tardon)