Fix export. Closes #883.