Fixed the advanced switch issue