Use rend() instead of --end()