Minor change the the parse_headers function

Hi Ben,

This line was causing errors for me every now and then. I think the below code fixes the issue.

Thanks,

Kai.