Swiper image carousel sync problem

I have an image carousel with a full page duplicate image carousel in a modal that I would like to sync. When I first open the modal it opens to the first image, regardless if which slide I was on. Afterwards it works fine. Any ideas on how to make the sync work initially?