Header condition bug fixed