fix #431, fix export cancels, and more debug prints