Fix clearHeaders to use array keys instead of plain text