Avoid calling .cend() twice