Yeah, I noticed the same problems while I was making the extension.
I think I’ve addressed most of them, I just went about it a different way. You can check out the code here.
I haven’t run into these problems since I published the extension, but I will put out an update with the latest version of @lyfox‘s script.