Fix 'Do Not assign to parameter' issues