improved header race issue