workaround for bad header parsing