-Fixed issue with visibility changed event.