fixed switch status bug