Exporting entry results in "Invalid context" error