fix find header loacation logic.