Added Debug option, fixed wrong determination of last Slicer.