If envelope parse fails this makes a correct envelope array

Sometimes the envelope parse fails and the process was interrupted. Is a case very exceptional, but sometimes it can happen. This snippet solve the error.