diff --git a/app/templates/header.html b/app/templates/header.html
index b353d92..50bde42 100644
--- a/app/templates/header.html
+++ b/app/templates/header.html
@@ -22,7 +22,7 @@
style="background-color: {{ 'var(--whoogle-dark-result-bg)' if config.dark else 'var(--whoogle-result-bg)' }} !important;
color: {{ 'var(--whoogle-dark-text)' if config.dark else 'var(--whoogle-text)' }};
type="text"
- value="{{ query[:query.find('-site:')] }}">
+ value="{{ query[:query.find('-site:')] if '-site:' in query else query }}">
@@ -54,7 +54,7 @@
name="q"
spellcheck="false"
type="text"
- value="{{ query[:query.find('-site:')] }}"
+ value="{{ query[:query.find('-site:')] if '-site:' in query else query }}"
style="background-color: {{ 'var(--whoogle-dark-result-bg)' if config.dark else 'var(--whoogle-result-bg)' }} !important;
color: {{ 'var(--whoogle-dark-text)' if config.dark else 'var(--whoogle-text)' }};
border-bottom: {{ '2px solid var(--whoogle-dark-element-bg)' if config.dark else '0px' }};">