Applying fix for by-ref methods