Possible array.slice bugfix