fixed bug with switching baseLayers messing up visibility toggling