Avoid index panic
Don't add tail if no needed.