device state fix