Fix task binding for switch