fix 3d bug