Fix incorrect collection JSON when exporting