add condition for MapSelected