Fix a bug with mako's template engine.