Fix bug in Sword exporter