when getting a layer by name we need to get the first element of the layer array that is returned