fix nullpointer in export