added a check which will reduce the number of announcements of state changes.