Yes, this is not perfect.
I'll also try to think more on that and update the PR if I found a better solution.