fixed erroneous header querying