bugfixes and hide logic.