Remove incorrect template calls from functions