fixed switch controller bugs