fix bug when closing device before returning home in VIT