bug fixes and header updates