Rendering fixes and improvements