redirect after toggling switch
(cherry picked from commit 634ef7d)