fixed export failure;closes #1231 closes#1232