Fixes slicing on Python 3