Fixed access exception when attempting to read undefined header