Solves issue #880 when clicking on the next slide button