Bugfix to not panic on some slices