3D viewer bug fixes