Eng 4854 Fix crash in export buffer handling