HSM strange behavior

That function works for me. How are you clearing the alert?