Use debounce to avoid occasional misalignments
Debounce faster
Check offset is truthy before measuring the viewport