Fix to end() and reset() requiring variables and not only references