Fix error message in export

Fixes #590