Possible fix for last_headers

Hi, the "lastHeader" method wasn't working for me, so I made a quick fix for myself. Didn't test it that much, just wanted to make it work in a hurry.