Add bounds checking and repeated/additional hdrs