Fixed bug with parsing headers.