Header length check added