main window header bug.
np error checking