A possible solution for issue #1.