Refactored the fix