fix baselayer switching