Fixed a bug involving slicing and Python3