Make templates more proxy friendly