Fixed bug on getting response headers