Small fix in _isInViewport function