fix the 3d bugs