fixed layerswitcher initialize