added new check for inserted headers