diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html
index ad3ca18..839400a 100644
--- a/layouts/partials/comments.html
+++ b/layouts/partials/comments.html
@@ -1,4 +1,4 @@
-{{ if and .Site.DisqusShortname (not (or .Site.Params.comments .Params.comments)) }}
+{{ if and (.Site.DisqusShortname) (.Param "comments") }}
diff --git a/layouts/partials/post_toc.html b/layouts/partials/post_toc.html
index b081932..436b71b 100644
--- a/layouts/partials/post_toc.html
+++ b/layouts/partials/post_toc.html
@@ -1,4 +1,4 @@
-{{ if .Params.toc }}
+{{ if .Param "toc" }}
{{- T "post_toc" -}}
{{ .TableOfContents }}