Fixed slicing range issue

The last layer was not being generated as a bitmap