Fixes a reference modification