visibility flags corrected