Fix layerType stuff