export improvements and fixed history bug