BF: fix bug determining slices in lightbox.py (#221). Thanks fto grlee77 to point this out and describe a fix