fixed #4261 Export bug

Though is a bug fix, previous fix is not present in QA_4_1 branch. So have to merge directly to the master branch.

Signed-off-by: Viduranga Wijesooriya <vpowerrc@gmail.com>