Fix bug in splitting string, due to the fact that python3 and python2 handle string differently