Fixed bug in viewport3d.