That does seem like a nicer and more robust solution. @MadMub if you agree, can you add that as a todo comment?