Forgot to change one Vector3d to Vector3i.