Fixing some small bugs with rendering.