Fix bug in hide state sync