Fixed Python 3 incompatibility with dict iteritems

render() should work in Py2 and 3 now.