beforeLeavingSTI