Fixed adding templates