fixed segv when no header is present + fixed terminal resizing