Fixed out of order bug in generated writer for starting new message