bug fix to export current selection