fixed bug: nullpointer when exporting without using the searchmask before