Make templates work how they should