ISSUE #103: fixed problem with headers being overwritten / removed