fixed switch issue