Better fix to slice problem.