fix bugs due to vector3d changes.