fix some bugs when adding headerview