Fixed bug when there is only one slide