Fixed Layering Code
Merge pull request #583 from Kiroshima/master

Fixed Layering Code