bugfix - wrong $lenght param of array_slice