Fix incorrect check
Merge pull request #247 from lfrancke/path-template-handler

Fix incorrect check from PR #243