Fixed splitting API on Python 3