Make rendering a little more robust