Fixing the profile page for the new jinja2 templating engine