cleaned up some inconsitencies in resizeWindow()