atemplate bug fixed