Some more fixes and actually letting checkHeader to be optional