Thanks all.
I was able to fix my issues. Here is the commit:
https://github.com/zorker/rothui/com...a1e35a75e8fc38
I opted for not using the OnUpdate. Not using it shows sometimes a blue tinted tooltip on portals/mailbox etc which I am totally fine with. Everything else is fixed now.