Fixed bug when calling headers() when headers are empty.