fixed bug with headers causing out of array bounds