fix bug on empty layergroup