Navigation buttons help

Hope someone can help me to complete my navigation buttons actions

I have a slideshow that loops and loads external images from an xml file.

I have placed 5 standard navigation buttons and so far they are working fine.

The only problem I have that I would like to fix is that when the users click the next or previous button it skips an image. But it does not happen all the times. Only when the looping slideshow has already started the transition to the next image.
Example: I am on image #3 and the slideshow has started the transition to image #4, if I click the next button it will jump to image #5 skipping the #4.

this is the code I am using on the timeline for the buttons

 
next_btn.onRelease = function() {
 myslideshow.nextImage();
 myslideshow.toggleDisplayMode();
};
prev_btn.onRelease = function() {
 myslideshow.previousImage();
 smyslideshow.toggleDisplayMode();
};
start_btn.onRelease = function() {
 myslideshow.loadImageNumber(0);
 playBtn._visible = true;
 pauseBtn._visible = false;
};
end_btn.onRelease = function() {
 myslideshow.loadImageNumber(31); 
 playBtn._visible = true;
 pauseBtn._visible = false;
};
stop();

Since I wanted the slideshow to keep looping even when users click the next and previous buttons, I added

myslideshow.toggleDisplayMode();

action to these buttons. In a certain way what is happening makes sense because it is like the slideshow is receiving two commands to keep looping the images, one from

myslideshow.nextImage(); 

and the other from

myslideshow.toggleDisplayMode();

Is there a way I can fix that and prevent it from happening?