Fixing layer on off problem
Merge pull request #37 from lmm-git/1.0.0

Backporting to master branch