remove useless code from template refs #1411