These seemed to be bugs, I only mirrored the code that was written in parseHeader.