Fix the mistake of generating new layerID