Improve after_success robustness