Fixeg bug when a device left the environment and comes back