Added a fix for modifying elements by reference in a view