Fixes for 3D rendering