Fix the window size handling

I didn't realize this was a fair bit off