Changed lightLayer to mainLayer.