Fixed a bug with visibility.