Revert changes in the fix leaf method