Fixing a window resize bug... hopefully.