fix bug with empty view_data in render()