Fixed .inViewport method