fixed visibility logic