Sprite sheet saves out of order

so whenever i export an animation as a sprite sheet, the sprites save out of order. How do i fix this?
what the animation should look like. - YouTube
below is one of the sprite sheets i’ve exported along with a picture of what the order actually is