fix a bug in exporting index map using GUI