# Objects location data after location keyframe

I have created a scene where a cube and a sphere collide with each other. The collision takes place in the 20th frame and on the 12th frame I have turned off the kinematic properties of both the cube and the sphere. This results the following animation:

Then I wanted to check the object's location after the collision so I used the following script:

for i,frame in enumerate(range(1,bpy.data.scenes[0].frame_end)):
bpy.context.scene.frame_set(frame)
print(i,bpy.data.objects['Cube'].location, bpy.data.objects['Sphere'].location)


Something wired happend the location of the objects didn't change after the 20th frame although it is easy to see that in the animation the objects continue to move even after the 200th frame. What causes this problem and how can I fix it?