basic switching works, restorectx still never gets called