fixed layer.name undefined