Fixed: don't do calculations when layers are off
Merge pull request #729 from Fly33/master

Fixed: don't do calculations when layers are off