Fixed the navigation button hack to use jinja2's proper casting syntax.