Fix deprecation warnings in templates.