In case you run into troubles, you can look a little closer to the code, interpreat the warnings, printing out your device at c++ level:
3.1 Warnings 3.2 Show Grating