Fix issue of disabling issues and contribute

Improve robustness of template display conditions