cherry-picked template change from c471cda