Fixed visibility change issue.