Properly decode header even if a word is encoded and there are missing spaces between words