Fix bug with arrayToParti()