BF: fix bug determining slices in lightbox.py (#221)

this addresses #221