Fix to use the right slice size