Add tail-end optimization.