Fixed layerModel creation.