Worked around window.innerHeight timing issue