I tested your code and it seems to work fine, I think it's better than the solution I have found and I will integrate it into the code, but unfortunately I won't integrate it trough accepting this pull request because I'm working on another branch (1.4.0) right now, and there's other things to put together along with your proposed patch.
I will of course add you to the list of contributors.
Thanks @pedrocarmona.
I tested your code and it seems to work fine, I think it's better than the solution I have found and I will integrate it into the code, but unfortunately I won't integrate it trough accepting this pull request because I'm working on another branch (1.4.0) right now, and there's other things to put together along with your proposed patch.
I will of course add you to the list of contributors.