fixed problem with layer with no visibility applied