thanks daniel

I noticed that and when it is set to close on image click the next/prev show all the time but do not work. so i set it to false leaving only to click overlay to close and it behaves...just the eroor i mentioned instead of showing image 1 of 8