Fix enabling/disabling layers. I think.