Fix for getting visible always returning true