A minimal code snippet to reproduce this issue would be great, but your initial code might also do the job?
Please create an issue here 6 with the code snippet, a brief description, and link to this topic for further information, so that we can track and fix it.
CC @pol1 in case you would like to add your information to the same issue.