Added event listener for window resize