added workaround for template debugging
added more workarounds for template debugging