Fixing fn() call on error