pad struct to improve hazard performance, fix off-by-one error