headers fixes and other minor fixes