Fixed isVisible() Utility Function

Fixed a bug in the utility function isVisible(), that always returned
true.