fix header not rerendering bug