fixed bug in views.render()