Improved the fix for issue #44