diff --git a/docker-mods/deluge/root/etc/cont-init.d/98-themepark b/docker-mods/deluge/root/etc/cont-init.d/98-themepark
index 8ca49502..4a32dafb 100644
--- a/docker-mods/deluge/root/etc/cont-init.d/98-themepark
+++ b/docker-mods/deluge/root/etc/cont-init.d/98-themepark
@@ -34,12 +34,13 @@ if [[ -z ${TP_THEME} ]]; then
fi
# Adding stylesheets
-if ! grep -q "${TP_DOMAIN}/css/base" /usr/lib/python3/dist-packages/deluge/ui/web/index.html; then
+INDEX_HTML='/usr/lib/python3.10/site-packages/deluge/ui/web/index.html'
+if ! grep -q "${TP_DOMAIN}/css/base" "$INDEX_HTML"; then
echo '---------------------------'
echo '| Adding the stylesheet |'
echo '---------------------------'
- sed -i "s/<\/head>/<\/head> /g" /usr/lib/python3/dist-packages/deluge/ui/web/index.html
- sed -i "s/<\/head>/<\/head> /g" /usr/lib/python3/dist-packages/deluge/ui/web/index.html
+ sed -i "s/<\/head>/<\/head> /g" "$INDEX_HTML"
+ sed -i "s/<\/head>/<\/head> /g" "$INDEX_HTML"
printf 'Stylesheet set to %s\n' "${TP_THEME}
"
-fi
\ No newline at end of file
+fi