Fix a few more bugs in the new render code