Fixed the header issue with resizing

Resizing the window now works properly. There are a couple bugs that I
will fix.