fix teplate debug info function (wrong way to resolve attaches)