Readded code that was removed by accident in the last commit
Merge branch 'fix-polygonrenderable'