Call resize method on window resize
fix indentation error