For what it’s worth, there’s a typo in your code.
Line 9 has CleanUnackCount instead of ClearUnackCount
CleanUnackCount
ClearUnackCount