fixed crash in export