fixed bugs with wrong newline handling in envelopes (game and editor)