Extending Rigid body frames beyond 250 frames

While working on a rigid body object blender, the animation wouldn’t work beyond 250 frames, though I had set the end frames to 500. The mistake I did was that, although the frames were set to 500 in the timeline, I had missed setting the same in the simulation end frame under the Rigid Body world dropdown menu. Changing this would set the animation rolling for the frames so set.